<template>
  <el-dialog :title="title" :visible.sync="dialogFormVisible" width="500px">
    <el-tabs v-model="activeName" stretch type="card" @tab-click="handleClick">
      <el-tab-pane label="优惠券活动" name="first">用户管理</el-tab-pane>
      <el-tab-pane label="骑行卡活动" name="second">配置管理</el-tab-pane>
      <el-tab-pane label="免押金卡活动" name="third">角色管理</el-tab-pane>
      <el-tab-pane label="充值余额" name="fouth">充值余额</el-tab-pane>
    </el-tabs>
  </el-dialog>
</template>
<script>
  // getYC, getYM
  import { getYY } from '@/api/shouye'
  export default {
    data() {
      return {
        activeName: 'first',
        title: '',
        dialogFormVisible: false,
        dataY: [],
        dataC: [],
        dataN: [],
        // id: [],
      }
    },
    methods: {
      handleClick() {
        // console.log(tab, event)
        this.fetchData()
      },
      showEdit(row) {
        if (!row) {
          this.title = '添加'
        } else {
          this.title = '用户机型详情'
          this.form = Object.assign({}, row)
        }
        this.dialogFormVisible = true
        // console.log(this.data, '有没有data')
      },

      async fetchData() {
        // this.listLoading = true
        const { data } = await getYY(this.queryForm)
        this.datay = data
        // console.log(this.dataY, '看里边data')
        // this.listLoading = false
      },
    },
  }
</script>
